#include "pb.h"
#include <unistd.h>
#include <string.h>

const char *label="|\\-/";


void pb()
{
  char arr[NUM];
  memset(arr,'\0',sizeof(arr));

  int cnt=0;
  int len = strlen(label);
  arr[cnt]=Right;


  while(cnt<=100)
  {

    printf("[%-100s][%d%%][%c]\r",arr,cnt,label[cnt%len]);
    fflush(stdout);
    arr[cnt]=Type;
    cnt++;
   if(cnt<100)
     arr[cnt]=Right;

    usleep(50000);
  }
  printf("\n");


}
